<?php


namespace core\entity;


use core\lib\BotAPI;

class Group {

    /**
     * 群ID
     * @var int
     */
    public $id = 0;

    /**
     * Group constructor.
     * @param $id
     */
    public function __construct($id) {
        $this->id = $id;
    }

    public function sendMessage(...$message) {
        $r_message = implode('', $message);
        return new Message([
            'message_id' => bot()->sendGroupMessage($this->id, $r_message),
            'message' => $r_message,
            'raw_message' => $r_message,
        ]);
    }

}
